#include <iostream>
#include <memory>

#include "Grammar.hpp"
#include "TokenCreator.hpp"
#include "RecognizerTest/NewToken.hpp"


using namespace std;

int main()
{

    Grammar grammar;

    grammar.addParserRule("TestRule1",

        tk("hallo1") >> tk("hallo2")|
        *(tk("hallo3") >> tk("hallo4")) |
        tk("hallo5") >> tk("hallo6") >> tk("hallo7")

    );

    TokenCreator tc;
    tc.names = {
        "Struct",
        "New",
        "Return",
        "If",
        "Else",
        "While",
        "For",
        "Identifier",
        "Integer",
        "Decimal",
        "String",
        "ParenthesesOpen",
        "ParenthesesClose",
        "BracesOpen",
        "BracesClose",
        "ChevronsOpen",
        "ChevronsClose",
        "Plus",
        "Minus",
        "Divide",
        "Eof",
        "LexerError"
    };
    tc.output("RecognizerTest/", "NewToken");


    cout << grammar.parserRules.at("TestRule1")->toString() << endl;

    return 0;
}
